home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Add-Ons / AppleScript / AS Tcl 1.0 / ASTclMacResource.r < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-28  |  2.3 KB  |  72 lines  |  [TEXT/CWIE]

  1. /*
  2.  * ASTcl -- DoAppleScript package for MacTcl 7.5.1
  3.  * This code adds the command "DoAppleScript <script>" to MacTcl.
  4.  *
  5.  * ASTclMacResource.r --
  6.  *    This file creates resources for use in a simple shell.
  7.  *    This is designed to be an example of using the Tcl libraries
  8.  *    in a Macintosh Application.
  9.  *
  10.  * Written on 960927.
  11.  * 
  12.  * Copyright (c) 1993-1994 Lockheed Missle & Space Company, AI Center
  13.  * Copyright (c) 1995-1996 Sun Microsystems, Inc.
  14.  *
  15.  * See the file "license.terms" for information on usage and redistribution
  16.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  17.  *
  18.  * modified by Theodore C. Belding
  19.  * University of Michigan Program for the Study of Complex Systems
  20.  * <mailto:Ted.Belding@umich.edu>
  21.  * <http://www-personal.engin.umich.edu>
  22.  * 
  23.  */
  24.  
  25. /* 
  26.  * Resources definitions for a Simple Tcl Shell 
  27.  */
  28.  
  29. #include <Types.r>
  30. #include <SysTypes.r>
  31.  
  32. #ifdef applec
  33. #    define    __kPrefSize 384
  34. #    define    __kMinSize 256    
  35. #    include "siow.r"
  36. #endif
  37.  
  38. #define RELEASE_CODE 0x00
  39.  
  40. /* 
  41.  * The mechanisim below loads Tcl source into the resource fork of the
  42.  * application.  The example below creates a TEXT resource named
  43.  * "Init" from the file "init.tcl".  This allows applications to use
  44.  * Tcl to define the behavior of the application without having to
  45.  * require some predetermined file structure - all needed Tcl "files"
  46.  * are located within the application.  To source a file for the
  47.  * resource fork the source command has been modified to support
  48.  * sourcing from resources.  In the below case "source -rsrc {Init}"
  49.  * will load the TEXT resource named "Init".
  50.  */
  51. read 'TEXT' (0, "Init", purgeable, preload) "::library:init.tcl";
  52.  
  53. /*
  54.  * The following resource is used when creating the 'env' variable in
  55.  * the Macintosh environment.  The creation mechanisim looks for the
  56.  * 'STR#' resource named "Tcl Environment Variables" rather than a
  57.  * specific resource number.  (In other words, feel free to change the
  58.  * resource id if it conflicts with your application.)  Each string in
  59.  * the resource must be of the form "KEYWORD=SOME STRING".  See Tcl
  60.  * documentation for futher information about the env variable.
  61.  *
  62.  * A good example of something you may want to set is: "TCL_LIBRARY=My
  63.  * disk:etc."
  64.  */
  65.  
  66. resource 'STR#' (128, "Tcl Environment Variables") {
  67.     {    "SCHEDULE_NAME=Agent Controller Schedule",
  68.         "SCHEDULE_PATH=Lozoya:System Folder:Tcl Lib:Tcl-Scheduler"
  69.     };
  70. };
  71.  
  72.